package net.hound;

import net.cl.utils.StringUtil;
import net.hound.site.video.Letv;
import net.hound.site.video.Sohu;
import net.hound.site.video.Tudou;

public class HoundFactory {

	public static IHound chooseHound(String url) {
		if (StringUtil.getMatch("^http://tv.sohu.com/(\\d{8}/n\\d{1,}).shtml$", url) != null)
			return new Sohu(url);
		else if (StringUtil.getMatch("^http://www.letv.com/ptv/vplay/(\\d{1,}).html$", url) != null)
			return new Letv(url);
		else if (StringUtil.getMatch("^http://www.tudou.com/programs/view/([^/]*)/?$", url) != null)
			return new Tudou(url);
		return null;
	}

}
